import requests


class MockLoginApi(object):
    @classmethod
    def login(cls, json_data):
        url = "http://127.0.0.1:5000/api/login"
        # header = {"Content_type":"application/json"}
        res = requests.post(url=url, json=json_data)
        return res


if __name__ == '__main__':
    data = {"username": "admin", "password": "123456"}
    resp = MockLoginApi.login(data)
    print(resp.json())
